<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>js自定义函数</title>
		<script>
			function printHello(c){
				for(var i=0;i<c;i++){
					document.write("<h2>第"+i+"次发毒誓，好好学习</h2>");
				}
			}
			function add(a,b){
				return a+b;
			}
			var r1=add(3,13);
			alert(r1);
			var r2=add("hello","node.js");
			alert(r2);
		</script>
	</head>
	<body>
		<h1>let,var的区别</h1>
		<button  type="button" onclick="printHello(prompt('请输入决心的次数'))">小汪表决心</button>
	</body>
</html>
